package com.zwh.autoconfigure.interceptor;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@ConfigurationProperties(value= WebInterceptorProperties.PREFIX,ignoreInvalidFields=true)
public class WebInterceptorProperties {
    public static final String PREFIX = "web.interceptor";

    private PropertiesItem login;
    private PropertiesItem log;


    public static class PropertiesItem{
        String enabled;
        List<String> addPathPatterns;
        List<String> excludePathPatterns;

        public String getEnabled() {
            return enabled;
        }

        public void setEnabled(String enabled) {
            this.enabled = enabled;
        }

        public List<String> getAddPathPatterns() {
            return addPathPatterns;
        }

        public void setAddPathPatterns(List<String> addPathPatterns) {
            this.addPathPatterns = addPathPatterns;
        }

        public List<String> getExcludePathPatterns() {
            return excludePathPatterns;
        }

        public void setExcludePathPatterns(List<String> excludePathPatterns) {
            this.excludePathPatterns = excludePathPatterns;
        }
    }

    public PropertiesItem getLogin() {
        return login;
    }

    public void setLogin(PropertiesItem login) {
        this.login = login;
    }

    public PropertiesItem getLog() {
        return log;
    }

    public void setLog(PropertiesItem log) {
        this.log = log;
    }
}
